<?php

$this->menu=array(
    array('label'=>'Back','url'=>array('index')),
    array('label'=>'Create','url'=>array('create')),
    array('label'=>'Update','url'=>array('update','id'=>$model->id)),
    array('label'=>'Delete','url'=>'#','linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
    array('label'=>'Manage','url'=>array('admin')),
);
?>

<h3> Data Doktor <?php echo $model->prefix_title.' '.$model->name.', '.$model->suffix_title ?> </h3>
<?php $this->widget('bootstrap.widgets.TbDetailView',array(
    'data'=>$model,
    'attributes'=>array(
        'id',
        'prefix_title',
        'name',
        'suffix_title',
        'status',
    ),
)); ?>
<br>

<br>
<?php if(!empty($model->trMMedicSchs[0])){ ?>
    <p align="center"> <?php echo CHtml::link('<br>Daftar ke '
        .$model->trMMedicSch[0]->layanan->nama.'<br>&nbsp;','?r=fo/layanan&id=layanan_id_induk&v='
            .$model->trMMedicSch[0]->layanan_id
            .'&v2='.$model->trMMedicSch[0]->layanan->layanan_id_induk.'&d_id='.$model->id,array('class'=>'btn btn-primary'));
        echo '&nbsp&nbsp&nbsp&nbsp';
        echo CHtml::link('<br>List Pasien Medic<br>&nbsp;','?r=fo/listpasien&id=layanan_id&v='
            .$model->trMMedicSch[0]->layanan_id
            .'&d_id='.$model->id,array('class'=>'btn btn-primary'));
        ?>
        <br> </p>
<?php };?>

<?php

if(!empty($model->trMMedicProfiles)):
    ?>
    <div id="profiles">
        <h4>Data Profile  </h4>
        <?php $this->renderPartial('_profile',array(
            'post'=>$model,
            'data'=>$data,
        )); ?>

    </div><!-- profiles -->
<?php
endif;
?>
<br />


<div id="profiles">
    <h4>Menambah Profile Baru</h4>

    <?php if(Yii::app()->user->hasFlash('commentSubmitted')): ?>
        <div class="flash-success">
            <?php echo Yii::app()->user->getFlash('commentSubmitted'); ?>
        </div>
    <?php else: ?>
        <?php $this->renderPartial('/trMMedicProfile/_form',array(
            'model'=>$profile,
        )); ?>
    <?php endif; ?>

</div><!-- profiles -->

<?php
// print_r($model->trMedicProfiles);
if(!empty($model->trMMedicSch)):
    ?>
    <div id="jadwal">
        <h4>Schedule</h4>
        <?php $this->renderPartial('/trMMedicSch/_view',array(
            //'post'=>$model,
            'data'=>$dataSchMedic,
        )); 
        echo "</div>";
endif;
?>
    <h4>Tambah Jadwal Praktek</h4>
        <?php
            $this->renderPartial('/trMMedicSch/_form',array(
            'post'=>$model,
            'data'=>$dataSchMedic,
        )); 

        ?>

    </div> <!--Jadwal Praktek -->